const childProcess = require('child_process')
const flexSdk = require('flex-sdk')
const pkg = require('../package.json')

const cmdLineOpts = [
    '-output',
    'dist/viil.swf',
    '-define=CONFIG::version, "5.4.1"',
    '--',
    'src/Viil.as'
]

childProcess.execFile(flexSdk.bin.mxmlc, cmdLineOpts, function (err, stdout, stderr) {
    console.log('err: ', err)
    console.log('stdout: ', stdout)
    console.log('stderr: ', stderr)
})
